#!/bin/bash

val=0


function listFile() {
    
    for file in `ls -a $1`; do
        if [ -d "$1/${file}" ] && [ "${file}" != "." ] && [ "${file}" != ".." ]; then
            listFile "$1/${file}"
        elif [ -f "${temp}/${file}" ]; then
            echo "$1/${file}"         
            ((val++))
        fi
    done
}

listFile $1

listFile "."

echo ${val}